<style scoped lang="less">
  // .s-table table .ivu-table-cell{
  //   padding-left: 10px;
  //   padding-right: 10px;
  // }
  .s-table{
    margin-top: 10px;
    .s-page{
      margin-top: 14px;
    }
  }
</style>
<template>
  <div class="s-table" ref="sTable">
    <Table border highlight-row :columns="tableHeader" :data="tableBody" size="small" :height="height"></Table>
    <Page :total="40" size="small" show-total show-elevator show-sizer class="s-page"></Page>
    <!-- <Page :total="40" size="small" show-total show-elevator class="s-page"></Page> -->
  </div>
</template>
<script>
export default {
  name: 'sTable',
  props: ['tableHeader', 'tableBody'],
  data () {
    return {
      height: 200
    }
  },
  mounted () {
    // console.log(this.$refs.sTable.offsetTop, document.body.clientHeight, this.$refs.sTable. offsetParent)
    this.height = document.body.clientHeight - this.$refs.sTable.offsetTop - 40
  },
  methods: {
    handleStart () {
      this.$Modal.info({
        title: 'Bravo',
        content: 'Now, enjoy the convenience of iView.'
      });
    }
  }
}
</script>